/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sun.scheduler.core.job;

/**
 *
 * @author Jonathan
 */
public abstract class Process
{

    private long est, lst;

    /**
     * Sets the earliest startTime
     *
     * @param startTime
     */
    public void setEarliestStartTime(long startTime)
    {
        this.est = startTime;
    }

    /**
     * gets the earliest start time
     *
     * @return est
     */
    public long getEarliestStartTime()
    {
        return est;
    }

    /**
     * sets the latest endtime
     *
     * @param endTime
     */
    public void setLatestEndTime(long endTime)
    {
        this.lst = endTime;
    }

    /**
     * Gets the latest endtime
     *
     * @return latest endtime
     */
    public long getLatestEndTime()
    {
        return lst;
    }

    /**
     * Gets the duration of the job
     *
     * @return duration
     */
    abstract long getDuration();

    /**
     * Returns the amount of resource of this job
     *
     * @return amount of resources needed by this job
     */
    abstract double getAmountOfResources();

    
    @Override
    public String toString()
    {
        return "d" + getDuration() + ", r" + getAmountOfResources() + " EST/LST " + getEarliestStartTime() + "/" + getLatestEndTime();
    }
}
